/*
 * @Author: szx
 * @Date: 2022-05-22 15:21:03
 * @LastEditTime: 2022-05-22 15:21:04
 * @Description:
 * @FilePath: \leetcode\面试题\08\03\03.js
 */
/**
 * @param {number[]} nums
 * @return {number}
 */
var findMagicIndex = function (nums) {
    for (let i = 0; i < nums.length; i++) if (nums[i] === i) return i;
    return -1;
};
